﻿using System;
using System.Runtime.InteropServices;

namespace SilverlightViewport.Common.Interop
{
    [ComImport, Guid("9C2CAD80-3424-11CF-B670-00AA004CD6D8"), 
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
    public interface IOleInPlaceSiteEx : IOleInPlaceSite
    {
        [PreserveSig]
        new int GetWindow(out IntPtr phwnd);
        [PreserveSig]
        new int ContextSensitiveHelp([In] int fEnterMode);
        [PreserveSig]
        new int CanInPlaceActivate();
        [PreserveSig]
        new int OnInPlaceActivate();
        [PreserveSig]
        new int OnUIActivate();
        [PreserveSig]
        new int GetWindowContext([MarshalAs(UnmanagedType.Interface)] out IOleInPlaceFrame ppFrame, 
                                 [MarshalAs(UnmanagedType.Interface)] out IOleInPlaceUIWindow ppDoc, 
                                 [Out, MarshalAs(UnmanagedType.LPArray)] RECT[] lprcPosRect, 
                                 [Out, MarshalAs(UnmanagedType.LPArray)] RECT[] lprcClipRect, 
                                 [In, Out, MarshalAs(UnmanagedType.LPArray)] OLEINPLACEFRAMEINFO[] lpFrameInfo);
        [PreserveSig]
        new int Scroll([In] SIZE scrollExtant);
        [PreserveSig]
        new int OnUIDeactivate([In] int fUndoable);
        [PreserveSig]
        new int OnInPlaceDeactivate();
        [PreserveSig]
        new int DiscardUndoState();
        [PreserveSig]
        new int DeactivateAndUndo();
        [PreserveSig]
        new int OnPosRectChange([In, MarshalAs(UnmanagedType.LPArray)] RECT[] lprcPosRect);
        [PreserveSig]
        int OnInPlaceActivateEx(out int pfNoRedraw, [In] uint dwFlags);
        [PreserveSig]
        int OnInPlaceDeactivateEx([In] int fNoRedraw);
        [PreserveSig]
        int RequestUIActivate();
    }
}
